package com.wlstock.funi.Trader;

import com.wlstock.funi.model.BaseModel;
import com.wlstock.funi.model.MyAccountStocks;
import com.wlstock.funi.model.StrategyFundModel;

/**
 * Created by admin on 16/9/20.
 */

public class TraderObject extends BaseModel {

    private String stkCode;

    private String stkName;

    private float weight;

    private float money;

    private long pty;

    public TraderObject(StrategyFundModel fundModel) {
        this.stkCode = fundModel.getStkNo();
        this.stkName = fundModel.getStkName();
        this.weight  = 1;
    }

    public TraderObject(MyAccountStocks stock) {

        this.stkCode = stock.getStkCode();
        this.stkName = stock.getStkName();
        this.weight  = 1;
    }

    public String getStkCode() {
        return stkCode;
    }

    public void setStkCode(String stkCode) {
        this.stkCode = stkCode;
    }

    public String getStkName() {
        return stkName;
    }

    public void setStkName(String stkName) {
        this.stkName = stkName;
    }

    public float getWeight() {
        if (weight>=1)
            return 1;
        return weight;
    }

    public void setWeight(float weight) {
        this.weight = weight;
    }

    public float getMoney() {
        return money;
    }

    public void setMoney(float money) {
        this.money = money;
    }

    public long getPty() {
        return pty;
    }

    public void setPty(long pty) {
        this.pty = pty;
    }
}
